package com.tenbit.emp.dao;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.tenbit.emp.vo.EMP1010VO;

import emp.tenbit.emp.bean.SearchEmpBean;

@Component
public class EmployeeQEMP1000DAO extends SqlSessionDaoSupport{
	@Autowired
	private SqlSessionTemplate sqlSession;
	private Logger log=Logger.getLogger(this.getClass());
	
	public List<EMP1010VO> listEmployeeJoin(SearchEmpBean emp){
		log.debug("listEmployeeJoin"+emp);
		return (List<EMP1010VO>)sqlSession.selectList("listEmployeeJoin",emp);
	}
	public int selectCountEmployee(SearchEmpBean emp){
		return (int)sqlSession.selectOne("selectCountEmployee",emp);
	}
	public String selectCtgName(String itemCode){
		return (String)sqlSession.selectOne("selectCtgName",itemCode);
	}
	public List<Map<String, Object>> listEmployee(Map<String, Object> paraMap){
		return (List<Map<String, Object>>)sqlSession.selectList("listEmployee",paraMap);
	}
	public List<Map<String, Object>> listEMP(Map<String, Object> paraMap){
		return (List<Map<String, Object>>)sqlSession.selectList("listEMP",paraMap);
	}
}